package y_2025.m03.d14.t01;

import java.util.Scanner;

public class PrintLetters {
    public static void main(String[] args) {
        char start = '\u0430';
        char end = '\u044F';
        for (char c = start; c <= end; c++) {
            System.out.print(c + " ");
        }
    }
}

class WhileSum {
    public static void main(String[] args) {
        int sum = 0, i = 21; // 直接遍历21的倍数
        while (i <= 1000) {
            sum += i;
            i += 21;
        }
        System.out.println("和为：" + sum);
    }
}




class ForSum {
    public static void main(String[] args) {
        int sum = 0, term = 0;
        for (int i = 0; i < 10; i++) {
            term = term * 10 + 8; // 生成当前项
            sum += term;          // 累加到总和
        }
        System.out.println("前十项和为：" + sum);
    }
}


class CylinderVolume {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("输入底面半径：");
        double r = scanner.nextDouble();
        System.out.print("输入高度：");
        double h = scanner.nextDouble();
        double volume = Math.PI * r * r * h;
        System.out.printf("体积：%.2f", volume);
        scanner.close();
    }
}

